package com.asset.dispoal.evidenceType.service;

import com.asset.dispoal.evidenceType.api.BsEvidenceTypeService;
import com.asset.dispoal.evidenceType.dto.BsEvidenceTypeRequest;
import com.asset.dispoal.evidenceType.dto.BsEvidenceTypeResponse;
import com.asset.dispoal.evidenceType.service.commom.EvidenceTypeDelCommand;
import com.asset.dispoal.evidenceType.service.commom.EvidenceTypeInsertCommand;
import com.asset.dispoal.evidenceType.service.commom.EvidenceTypeQueryCommand;
import com.asset.dispoal.evidenceType.service.commom.EvidenceTypeUpdateCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * 证据种类表服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-24 09:42:45
 */
@Service
public class BsEvidenceTypeServiceImpl implements BsEvidenceTypeService {

    @Autowired
    EvidenceTypeDelCommand evidenceTypeDelCommand;

    @Autowired
    EvidenceTypeQueryCommand evidenceTypeQueryCommand;

    @Autowired
    EvidenceTypeInsertCommand evidenceTypeInsertCommand;

    @Autowired
    EvidenceTypeUpdateCommand evidenceTypeUpdateCommand;


    @Override
    public Result insert(BsEvidenceTypeRequest request) {
        Result execute = evidenceTypeInsertCommand.execute(request);
        return execute;
    }

    @Override
    public Result update(BsEvidenceTypeRequest request) {
        return evidenceTypeUpdateCommand.execute(request);
    }

    @Override
    public Result delete(String id) {
        return evidenceTypeDelCommand.execute(id);
    }

    @Override
    public Result<PageVO<BsEvidenceTypeResponse>> queryPage(BsEvidenceTypeRequest request) {
        return evidenceTypeQueryCommand.execute(request);
    }
}